package com.chenglu.android.mine.address.mvp.contract;


import com.chenglu.android.common.base.BaseView;
import com.chenglu.android.mine.bean.AddressListBean;
import com.chenglu.android.mine.bean.AddressSubmitBean;
import com.chenglu.android.mine.bean.AddressTreeBean;
import com.chenglu.android.mine.bean.CommonDataBean;

import io.reactivex.rxjava3.core.Observable;
import okhttp3.RequestBody;

/**
 * @author: lyj
 * @Created by Copyright 2023/3/2 Guangzhou Hongma Technology Co., Ltd. All rights reserved.
 */
public interface AddressManagerContract {

    /**
     * @description model
     */

    public interface AddressManagerModel {

        Observable<AddressListBean> getAddressList(String token);

        Observable<AddressSubmitBean> getAddressSubmit(String token, RequestBody requestBody);

        Observable<AddressSubmitBean> getAddressUpdate(String token, RequestBody requestBody);


        Observable<AddressTreeBean> getAddressTree();

        Observable<CommonDataBean> getAddressDelete(String token, String ids);


        //刷新的token
    }


    /**
     * @description view
     */

    interface View extends BaseView {
        @Override
        void showLoading();

        @Override
        void dismissLoading();

        @Override
        void onEmpty(Object tag);

        @Override
        void onError(String errMessage);

        void getAddressList(AddressListBean addressList);

        void getAddressSubmit(AddressSubmitBean submitBean);

        void getAddressUpdate(AddressSubmitBean submitBean);

        void getAddressTree(AddressTreeBean treeBean);

        void getAddressDelete(CommonDataBean deleteBean);


    }

    /**
     * @description presenter
     */

    interface AddressManagerPresenter {


        void getAddressList(String token);

        void getAddressSubmit(String token, RequestBody requestBody);

        void getAddressUpdate(String token, RequestBody requestBody);

        void getAddressTree();

        void getAddressDelete(String token, String ids);

    }
}